import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    loginUser : {},
    authMenus : []
  },
  mutations: {
    login(state, user) {
      state.loginUser = user;
    },
    selectMenu(state,menus){
      state.authMenus = menus;
    },
    avatar(state,avatar){
      state.loginUser.image = avatar;
    }
  },
  actions: {

  }
})
